package cc.lj.internal.payment.infrastructure.repository;

import cc.lj.internal.core.model.PageParam;
import cc.lj.internal.payment.domain.settlement.repository.ICouponsSubsidyDetailRepository;
import cc.lj.internal.payment.infrastructure.po.CouponsSubsidyDetailPO;
import cc.lj.internal.payment.infrastructure.repository.mysql.CouponsSubsidyDetailMysqlRespository;
import cc.lj.internal.payment.infrastructure.repository.mysql.TicketPayRecordMysqlRespository;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;

/**
 * 电子券分摊明细表 repository 实现类
 * @author liangxifeng
 * @date 2022/10/24 14:53
 */
@Repository("couponsSubsidyDetailRepository")
public class CouponsSubsidyDetailRepository implements ICouponsSubsidyDetailRepository {
    @Resource(name="couponsSubsidyDetailMysqlRespository")
    private CouponsSubsidyDetailMysqlRespository repository;

    @Override
    public Integer updateById(CouponsSubsidyDetailPO entityPO) {
        return repository.updateById(entityPO);
    }

    @Override
    public PageInfo<CouponsSubsidyDetailPO> selectPage(PageParam pageParam) {
        return repository.selectPage(pageParam);
    }

    @Override
    public List<CouponsSubsidyDetailPO> getList(CouponsSubsidyDetailPO entityPO) {
        return repository.getList(entityPO);
    }

    @Override
    public Integer insert(CouponsSubsidyDetailPO entityPO) {
        return repository.insert(entityPO);
    }

    @Override
    public BigDecimal getMartSharePriceSum(CouponsSubsidyDetailPO detailPO) {
        return repository.getMartSharePriceSum(detailPO);
    }

    @Override
    public CouponsSubsidyDetailPO getById(Integer id) {
        return repository.getById(id);
    }
}
